#!/bin/sh
#
# $$
#

# PROVIDE: mail
# REQUIRE: LOGIN exim
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable mailquotad:
#
# mailquotad_enable="YES"
#

. /etc/rc.subr

name=mailquotad
rcvar=mailquotad_enable

command=%%PREFIX%%/sbin/mailquotad
pidfile=/var/run/quotad/mailquotad.pid
required_dirs=/var/run/quotad

stop_postcmd=stop_postcmd

stop_postcmd()
{
  rm -f $pidfile
}

# read settings, set default values
load_rc_config $name
: ${mailquotad_enable="NO"}
: ${mailquotad_flags=""}

run_rc_command "$1"
